/*
 * boundedbuffer.h
 *
 *  Created on: Apr 10, 2011
 *      Author: xozyain
 */

#ifndef BOUNDEDBUFFER_H_
#define BOUNDEDBUFFER_H_

struct semaphore;


typedef struct Link{
	void * element;
	struct Link * next;
} Lnk;

struct BB{
	int _max_capacity;
	int mutex;
	struct semaphore* empty;
	struct semaphore* full;
	Lnk * bufferList;
	Lnk * last;
	int count; // for debug
};

#endif /* BOUNDEDBUFFER_H_ */
